<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"/>

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<link rel="stylesheet" href="base.min.css"/>
<link rel="stylesheet" href="fancy.min.css"/>
<link rel="stylesheet" href="main.css"/>
<script src="compatibility.min.js"></script>
<script src="theViewer.min.js"></script>
<script>
try{
theViewer.defaultViewer = new theViewer.Viewer({});
}catch(e){}
</script>
<title></title>
</head>
<body>
<div id="sidebar">
<div id="outline">
</div>
</div>
<div id="page-container">
<div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bg1.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x1 h1 y1 ff1 fs0 fc0 sc0 ls0 ws0">Demystifying </div><div class="t m0 x1 h2 y2 ff1 fs1 fc0 sc0 ls0 ws0">the Nuts &amp; <span class="_ _0"></span>Bolts of </div><div class="t m0 x1 h1 y3 ff1 fs0 fc0 sc0 ls0 ws0">Kubernetes </div><div class="t m0 x1 h1 y4 ff1 fs0 fc0 sc0 ls0 ws0">Architecture</div><div class="t m0 x2 h3 y5 ff1 fs2 fc1 sc0 ls0 ws0">Services101</div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pf2" class="pf w0 h0" data-page-no="2"><div class="pc pc2 w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bg2.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x3 h4 y6 ff1 fs3 fc0 sc0 ls0 ws0">Services</div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pf3" class="pf w0 h0" data-page-no="3"><div class="pc pc3 w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bg3.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x4 h5 y7 ff1 fs4 fc0 sc0 ls0 ws0">Imagine that<span class="_ _0"></span>, <span class="_ _0"></span>you have <span class="_ _0"></span>been asked <span class="_ _1"></span>to deploy <span class="_ _1"></span>we<span class="_ _2"></span>b app</div><div class="t m0 x4 h6 y8 ff2 fs5 fc0 sc0 ls0 ws0">How does this fron<span class="_ _1"></span>tend  w<span class="_ _2"></span>eb ap<span class="_ _1"></span>p <span class="_ _2"></span>exposed<span class="_ _1"></span> <span class="_ _2"></span>to outside world?</div><div class="t m0 x4 h7 y9 ff2 fs2 fc0 sc0 ls0 ws0">How do front end app<span class="_ _1"></span> <span class="_ _2"></span>connected to backend database<span class="_ _1"></span>?</div><div class="t m0 x4 h7 ya ff2 fs2 fc0 sc0 ls0 ws0">How do we resolve<span class="_ _1"></span> <span class="_ _2"></span>Pod IP<span class="_ _1"></span> chang<span class="_ _1"></span>es, <span class="_ _2"></span> when they die?</div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pf4" class="pf w0 h0" data-page-no="4"><div class="pc pc4 w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bg4.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x5 h8 yb ff1 fs6 fc2 sc0 ls0 ws0">4</div><div class="t m0 x5 h9 yc ff1 fs7 fc2 sc0 ls0 ws0">Agenda</div><div class="t m0 x5 h5 yd ff3 fs4 fc2 sc0 ls0 ws0">•<span class="_ _3"> </span><span class="ff1 fc3">Why do <span class="_ _1"></span>we need services?</span></div><div class="t m0 x5 h5 ye ff3 fs4 fc2 sc0 ls0 ws0">•<span class="_ _3"> </span><span class="ff1 fc3">What <span class="_ _1"></span>is Service?</span></div><div class="t m0 x5 h5 yf ff3 fs4 fc2 sc0 ls0 ws0">•<span class="_ _3"> </span><span class="ff1 fc3">T<span class="_ _4"></span>ype of <span class="_ _1"></span>Services</span></div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pf5" class="pf w0 h0" data-page-no="5"><div class="pc pc5 w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bg5.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x5 h8 yb ff1 fs6 fc2 sc0 ls0 ws0">5</div><div class="t m0 x5 h9 yc ff1 fs7 fc2 sc0 ls0 ws0">Services</div><div class="t m0 x5 h3 y10 ff3 fs2 fc2 sc0 ls0 ws0">•<span class="_ _5"> </span><span class="ff1 fc1">An abstraction w<span class="_ _1"></span>hich <span class="_ _6"></span>defines a logical set of Pods and a policy by whi<span class="_ _0"></span>ch <span class="_ _2"></span>to access </span></div><div class="t m0 x6 h3 y11 ff1 fs2 fc1 sc0 ls0 ws0">them (sometimes this pattern is called<span class="_ _1"></span> <span class="_ _2"></span>a micro-service<span class="ls1">).</span></div><div class="t m0 x5 ha y12 ff3 fs5 fc2 sc0 ls0 ws0">•<span class="_ _5"> </span><span class="ff1 fc1">Service acts as a l<span class="_ _1"></span>ayer above the pods. It is alw<span class="_ _1"></span>ay<span class="_ _1"></span>s <span class="_ _6"></span>aw<span class="_ _1"></span>are <span class="_ _6"></span>of the pod<span class="_ _1"></span>s <span class="_ _2"></span>that it </span></div><div class="t m0 x6 h3 y13 ff1 fs2 fc1 sc0 ls0 ws0">manages: their count, their intern<span class="_ _0"></span>al IP<span class="_ _1"></span> addresses, the ports they expose and so </div><div class="t m0 x6 h3 y14 ff1 fs2 fc1 sc0 ls2 ws0">on<span class="ls0">.</span></div><div class="t m0 x5 h3 y15 ff3 fs2 fc2 sc0 ls0 ws0">•<span class="_ _5"> </span><span class="ff1 fc1">Service can be define<span class="_ _1"></span>d <span class="_ _2"></span>using a Y<span class="_ _7"></span>AML<span class="_ _8"></span> or JSON file that contains the necessa<span class="_ _1"></span>ry </span></div><div class="t m0 x6 ha y16 ff1 fs5 fc1 sc0 ls0 ws0">definitio<span class="_ _1"></span>ns</div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pf6" class="pf w0 h0" data-page-no="6"><div class="pc pc6 w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bg6.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x5 h8 yb ff1 fs6 fc2 sc0 ls0 ws0">6</div><div class="t m0 x5 h9 yc ff1 fs7 fc2 sc0 ls0 ws0">Can W<span class="_ _8"></span>e Use <span class="_ _7"></span>A<span class="_ _7"></span> Kubernetes <span class="_ _1"></span>Service Without <span class="_ _1"></span>Pods?</div><div class="t m0 x5 h3 y10 ff3 fs2 fc2 sc0 ls0 ws0">•<span class="_ _5"> </span><span class="ff1 fc1">Access an <span class="_ _4"></span>API outside y<span class="_ _1"></span>our <span class="_ _6"></span>cluster (ex<span class="_ _1"></span>amples: <span class="_ _2"></span>w<span class="_ _1"></span>eather<span class="_ _4"></span>, <span class="_ _6"></span>stocks, currency<span class="_ _1"></span> <span class="_ _2"></span>rates).</span></div><div class="t m0 x5 h3 y17 ff3 fs2 fc2 sc0 ls0 ws0">•<span class="_ _5"> </span><span class="ff1 fc1">Y<span class="_ _7"></span>ou have a service<span class="_ _1"></span> <span class="_ _2"></span>in another <span class="fc2">Kubernetes </span>cluster that you<span class="_ _1"></span> <span class="_ _2"></span>need to contact.</span></div><div class="t m0 x5 ha y18 ff3 fs5 fc2 sc0 ls0 ws0">•<span class="_ _5"> </span><span class="ff1 fc1">Y<span class="_ _7"></span>ou<span class="_ _0"></span> need to shift some<span class="_ _1"></span> of your infrastructure compon<span class="_ _1"></span>ents <span class="_ _2"></span>to Kubern<span class="_ _1"></span>etes. <span class="_ _2"></span>But, </span></div><div class="t m0 x6 hb y19 ff3 fs2 fc1 sc0 ls0 ws0">since you<span class="_ _1"></span>’re <span class="_ _2"></span>still evaluating the technology<span class="_ _7"></span>, you <span class="_ _2"></span>need it to communicate<span class="_ _1"></span> <span class="_ _2"></span>w<span class="_ _1"></span>ith <span class="_ _6"></span>some </div><div class="t m0 x6 h3 y1a ff1 fs2 fc1 sc0 ls0 ws0">backend appl<span class="_ _1"></span>ications <span class="_ _2"></span>that are still outside the cluster<span class="_ _4"></span>.</div><div class="t m0 x5 h3 y1b ff3 fs2 fc2 sc0 ls0 ws0">•<span class="_ _5"> </span><span class="ff1 fc1">Y<span class="_ _7"></span>ou have ano<span class="_ _1"></span>ther <span class="_ _2"></span>service in another <span class="fc2">namespace </span>that you<span class="_ _1"></span> <span class="_ _2"></span>need to reach.</span></div><div class="t m0 x5 hc y1c ff1 fs8 fc3 sc0 ls0 ws0">Y<span class="_ _9"></span>es!</div></div><a class="l" href="https://www.magalix.com/blog/kubernetes-101-concepts-and-why-it-matters"><div class="d m1" style="border-style:none;position:absolute;left:280.130000px;bottom:247.460000px;width:97.080000px;height:16.200000px;background-color:rgba(255,255,255,0.000001);"></div></a><a class="l" href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces"><div class="d m1" style="border-style:none;position:absolute;left:331.130000px;bottom:153.360000px;width:92.780000px;height:13.200000px;background-color:rgba(255,255,255,0.000001);"></div></a></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pf7" class="pf w0 h0" data-page-no="7"><div class="pc pc7 w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bg7.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x5 h8 yb ff1 fs6 fc2 sc0 ls0 ws0">7</div><div class="t m0 x5 h9 yc ff1 fs7 fc2 sc0 ls0 ws0">Services</div><div class="t m0 x7 hd y1d ff1 fs9 fc0 sc0 ls0 ws0">192.168.1.1</div><div class="t m0 x8 hd y1e ff1 fs9 fc0 sc0 ls0 ws0">app:db</div><div class="t m0 x9 hd y1f ff1 fs9 fc1 sc0 ls0 ws0">Backend </div><div class="t m0 x9 hd y20 ff1 fs9 fc1 sc0 ls0 ws0">Pod</div><div class="t m0 xa h3 y21 ff1 fs2 fc1 sc0 ls0 ws0">Node</div><div class="t m0 xb he y22 ff1 fsa fc0 sc0 ls0 ws0">Service(backend)</div><div class="t m0 xb he y23 ff1 fsa fc0 sc0 ls0 ws0">Service(frontend)</div><div class="t m0 xc hd y24 ff1 fs9 fc1 sc0 ls0 ws0">Frontend </div><div class="t m0 xc hd y25 ff1 fs9 fc1 sc0 ls0 ws0">Pod</div><div class="t m0 xd hd y26 ff1 fs9 fc1 sc0 ls0 ws0">User</div><div class="t m0 xe h3 y27 ff1 fs2 fc1 sc0 ls0 ws0">Frontend Service:</div><div class="t m0 xe h3 y28 ff1 fs2 fc1 sc0 ls0 ws0">A<span class="_ _4"></span> Service w<span class="_ _1"></span>hich <span class="_ _2"></span>stays betwee<span class="_ _1"></span>n <span class="_ _6"></span>user and </div><div class="t m0 xe h3 y29 ff1 fs2 fc1 sc0 ls0 ws0">frontend <span class="ls2">pod</span></div><div class="t m0 xe ha y2a ff1 fs5 fc1 sc0 ls0 ws0">Backend<span class="_ _1"></span> <span class="_ _2"></span>Service:</div><div class="t m0 xe h3 y2b ff1 fs2 fc1 sc0 ls0 ws0">A<span class="_ _4"></span> Service w<span class="_ _1"></span>hich <span class="_ _2"></span>communicate betw<span class="_ _1"></span>een </div><div class="t m0 xe h3 y2c ff1 fs2 fc1 sc0 ls0 ws0">frontend Pod and backen<span class="_ _0"></span>d end </div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pf8" class="pf w0 h0" data-page-no="8"><div class="pc pc8 w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bg8.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x5 h8 yb ff1 fs6 fc2 sc0 ls0 ws0">8</div><div class="t m0 xf h3 y2d ff1 fs2 fc1 sc0 ls0 ws0">T<span class="_ _8"></span>y<span class="_ _0"></span>pes of Services</div><div class="t m0 x10 hf y2e ff1 fsb fc0 sc0 ls0 ws0">Node-1</div><div class="t m0 x11 h10 y2f ff1 fsc fc0 sc0 ls0 ws0">ClusterIP</div><div class="t m0 x12 h10 y30 ff1 fsc fc0 sc0 ls0 ws0">NodePort</div><div class="t m0 x13 he y31 ff1 fsa fc0 sc0 ls0 ws0">Node-1</div><div class="t m0 x14 h10 y32 ff1 fsc fc0 sc0 ls0 ws0">LoadBalancer</div><div class="t m0 x15 h11 y33 ff1 fsd fc0 sc0 ls0 ws0">Node-1<span class="_ _a"> </span>Node-1</div><div class="t m0 x16 h11 y34 ff1 fsd fc0 sc0 ls0 ws0">Node-1</div><div class="t m0 xe h12 y35 ff1 fse fc1 sc0 ls0 ws0">-<span class="_ _b"> </span>Reachable <span class="_ _1"></span>within the </div><div class="t m0 x17 h12 y36 ff1 fse fc1 sc0 ls0 ws0">cluster<span class="_ _8"></span>.</div><div class="t m0 xe h12 y37 ff1 fse fc1 sc0 ls0 ws0">-<span class="_ _b"> </span>Connects <span class="_ _1"></span>Frontend </div><div class="t m0 x17 h12 y38 ff1 fse fc1 sc0 ls0 ws0">Pods to <span class="_ _1"></span>Back<span class="_ _2"></span>end <span class="_ _1"></span>Pods</div><div class="t m0 x18 h12 y39 ff1 fse fc1 sc0 ls0 ws0">-<span class="_ _b"> </span>Exposing <span class="_ _1"></span>Frontend <span class="_ _1"></span>app </div><div class="t m0 xf h12 y3a ff1 fse fc1 sc0 ls0 ws0">to ex<span class="_ _1"></span>ternal world</div><div class="t m0 x19 h12 y3b ff1 fse fc1 sc0 ls0 ws0">-<span class="_ _b"> </span>Equally distribute <span class="_ _8"></span>t<span class="_ _2"></span>he loads</div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pf9" class="pf w0 h0" data-page-no="9"><div class="pc pc9 w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bg9.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x5 h8 yb ff1 fs6 fc2 sc0 ls0 ws0">9</div><div class="t m0 x5 h9 yc ff1 fs7 fc2 sc0 ls0 ws0">A<span class="_ _7"></span> <span class="_ _8"></span>T<span class="_ _7"></span>ypical Service W<span class="_ _8"></span>or<span class="_ _2"></span>kFlow</div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pfa" class="pf w0 h0" data-page-no="a"><div class="pc pca w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bga.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x3 h4 y6 ff1 fs3 fc0 sc0 ls0 ws0">Services: Clus<span class="_ _2"></span>terIP</div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pfb" class="pf w0 h0" data-page-no="b"><div class="pc pcb w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bgb.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x5 h8 yb ff1 fs6 fc2 sc0 ls3 ws0">11</div><div class="t m0 x5 h9 yc ff1 fs7 fc2 sc0 ls0 ws0">Services</div><div class="t m0 x5 h5 yd ff3 fs4 fc2 sc0 ls0 ws0">•<span class="_ _3"> </span><span class="ff1 fc3">Imagine you <span class="_ _1"></span>need to deploy <span class="_ _1"></span>one full fledge app <span class="_ _1"></span>wh<span class="_ _2"></span>ich consists <span class="_ _1"></span>of </span></div><div class="t m0 x6 h5 y3c ff1 fs4 fc3 sc0 ls0 ws0">frontend <span class="_ _1"></span>app  &amp; backend <span class="_ _1"></span>app</div><div class="t m0 x5 h5 y3d ff3 fs4 fc2 sc0 ls0 ws0">•<span class="_ _3"> </span><span class="ff1 fc3">How can we <span class="_ _1"></span>restric<span class="_ _2"></span>t <span class="_ _1"></span>access<span class="_ _2"></span> <span class="_ _1"></span>of backend <span class="_ _1"></span>databas<span class="_ _2"></span>e <span class="_ _1"></span>to only within the </span></div><div class="t m0 x6 h5 y3e ff1 fs4 fc3 sc0 ls0 ws0">kubernetes <span class="_ _1"></span>cluster<span class="_ _2"></span>?</div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pfc" class="pf w0 h0" data-page-no="c"><div class="pc pcc w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bgc.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x5 h8 yb ff1 fs6 fc2 sc0 ls3 ws0">12</div><div class="t m0 x1a hd y3f ff1 fs9 fc1 sc0 ls0 ws0">192.168.1.1:31000</div><div class="t m0 x1b h12 y40 ff1 fse fc1 sc0 ls0 ws0">Services</div><div class="t m0 x1c h13 y41 ff1 fsf fc1 sc0 ls0 ws0">10.210.1.1:8<span class="_ _2"></span>080</div><div class="t m0 x1d h3 y42 ff1 fs2 fc1 sc0 ls0 ws0">User</div><div class="t m0 x1e h12 y43 ff1 fse fc4 sc0 ls0 ws0">NodePort</div><div class="t m0 x1f h12 y44 ff1 fse fc4 sc0 ls0 ws0">ClusterIP</div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pfd" class="pf w0 h0" data-page-no="d"><div class="pc pcd w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bgd.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x5 h8 yb ff1 fs6 fc2 sc0 ls3 ws0">13</div><div class="t m0 x5 h9 yc ff1 fs7 fc2 sc0 ls0 ws0">Guestbook <span class="_ _1"></span>Demo</div><div class="t m0 x5 h5 yd ff3 fs4 fc2 sc0 ls0 ws0">•<span class="_ _3"> </span><span class="ff1 fc3">Frontend <span class="_ _1"></span>Web <span class="_ _1"></span>app</span></div><div class="t m0 x5 h5 y45 ff3 fs4 fc2 sc0 ls0 ws0">•<span class="_ _3"> </span><span class="ff1 fc3">Backend DB -<span class="_ _c"> </span>Redis</span></div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pfe" class="pf w0 h0" data-page-no="e"><div class="pc pce w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bge.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x5 h8 yb ff1 fs6 fc2 sc0 ls3 ws0">14</div><div class="t m0 x5 h9 yc ff1 fs7 fc2 sc0 ls0 ws0">References</div><div class="t m0 x5 h5 yd ff3 fs4 fc2 sc0 ls0 ws0">•<span class="_ _3"> </span><span class="ff1 fc3">https://kubelabs.<span class="_ _1"></span>co<span class="_ _2"></span>llabnix.com</span></div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
<div id="pff" class="pf w0 h0" data-page-no="f"><div class="pc pcf w0 h0"><img class="bi x0 y0 w0 h0" alt="" src="bgf.png"/><div class="c x0 y0 w1 h0"><div class="t m0 x3 h4 y6 ff1 fs3 fc0 sc0 ls0 ws0">Thank <span class="_ _1"></span>Y<span class="_ _d"></span>ou</div></div></div><div class="pi" data-data='{"ctm":[1.000000,0.000000,0.000000,1.000000,0.000000,0.000000]}'></div></div>
</div>
<div class="loading-indicator">

</div>
</body>
</html>
